<?
	$params[sid] = $sid;
	$params[action] = "editStyle";
	$url = "$baseURL/$webDIR/?".encode_params($params);
	$data = get_interface_settings($id);
	if(is_array($data))
		while(list($k,$v) = each($data)){
			$$k = $v;
		}
	if($style){
		$ch[0] = "checked";
	}
	else{
		$ch[1] = "checked";
	}
	$style = unserialize($styleData);

//	if($errorMsg) echo "<br><div class=errormsg>$errorMsg</div><br>";
//	$errorMsg = "";
?>
<TABLE border=1 class='bTable' cellspacing='0' width='750'>
<form action='<?=$url;?>' method='POST'>
	<TR>
		<TH colspan='2'>Style/Colors</TH>
	</TR>
	<TR>
		<TD><input type='radio' name='type' value='style' <?=$ch[0];?>>Select Style
		</td>
		<td>
<?
	if ($errorMsg) {
	include_once('errorMsg.html');
	}
	if ($okMsg) {
	include_once('okMsg.html');
	}
	else{
	}
?>

		<table>
		<tr>
		<td align='center'>
			<img src='images/d1.JPG'><br>
			<input type='radio' name='styleName' value='styles.css'>Classic
		</td>
		</tr>
		</table>
		
<!--
		<select name='styleName'>
				<option value="classic">classic</option>
				<option value="aqua">aq</option>
				<option value="blue" SELECTED>blue</option>
				<option value="metal">metal</option>
		</select>
-->
		</TD>
	</TR>
	<TR>
		<TD valign='top'><input type='radio' name='type' value='custom'  <?=$ch[1];?> >Custom Style
		</td>
		<td>
			<div>

				<TABLE width='100%' class='bTable' cellspacing='0'>
					<TR>
							<TH>position</TH>
							<TH colspan='2'>Text color</TH>
							<TH colspan='2'>Text size</TH>

							<TH colspan='2'>Background color</TH>

							<TH colspan='2'>Links color</TH>
							<TH colspan='2'>Links size</TH>
							<TH colspan='2'>Font family</TH>
					</TR>
                                        <TR>
                                                <TD colspan='100'>&nbsp;</TD>
                                        </TR>
					<TR>
							<TD>Global</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'><div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style[body]['color'];?>;'>
								&nbsp;
								</div>
							</TD>
							<TD bgcolor='#DDDDDD'>
								<input type='text' name='style[body][color]' size='8' value='<?=$style[body]['color'] ;?>'>
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-size:<?=$style[body]['font-size'];?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD>
								<input type='text' name='style[body][font-size]' size='4' value='<?=$style[body]['font-size'] ;?>'>px
							</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style[body]['background-color'];?>;'>
								&nbsp;
								</div>
							</TD>
							<TD  bgcolor='#DDDDDD'>
								<input type='text' name='style[body][background-color]' size='8' value='<?=$style[body]['background-color'] ;?>'>
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style[a][color];?>;'>
								&nbsp;
								</div>
							</TD>
							<TD>
								<input type='text' name='style[a][color]' size='8' value='<?=$style[a][color] ;?>'>
							</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-size:<?=$style[a]['font-size'];?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD  bgcolor='#DDDDDD'>
								<input type='text' name='style[a][font-size]' size='4' value='<?=$style[a]['font-size'] ;?>'>px
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-family:<?=$style[body]['font-family'] ;?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD>
								<input type='text' name='style[body][font-family]' size='4' value='<?=$style[body]['font-family'] ;?>'>
							</TD>
							<!------------------------->


					</TR>
					<TR>
						<TD colspan='100'>&nbsp;</TD>
					</TR>
					<TR>
							<TD>Header</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.header']['color'];?>;'>
								&nbsp;
								</div>
							</TD>
							<TD  bgcolor='#DDDDDD'>
								<input type='text' name='style[.header][color]' size='8' value='<?=$style['.header']['color'] ;?>'>
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-size:<?=$style['.header']['font-size'] ;?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD>
								<input type='text' name='style[.header][font-size]' size='4' value='<?=$style['.header']['font-size'] ;?>'>px
							</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.header']['background-color'] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD   bgcolor='#DDDDDD'>
								<input type='text' name='style[.header][background-color]' size='8' value='<?=$style['.header']['background-color'] ;?>'>
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.header:a'][color] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD>
								<input type='text' name='style[.header:a][color]' size='8' value='<?=$style['.header:a'][color] ;?>'>
							</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-size:<?=$style['.header:a']['font-size'] ;?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD   bgcolor='#DDDDDD'5>
								<input type='text' name='style[.header:a][font-size]' size='4' value='<?=$style['.header:a']['font-size'] ;?>'>px
							</TD>
							<!------------------------->
							<TD colspan='2'></TD>

					</TR>
					<TR>
							<TD>Menu</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.menu']['color'] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD   bgcolor='#DDDDDD'>
								<input type='text' name='style[.menu][color]' size='8' value='<?=$style['.menu']['color'] ;?>'>
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-size:<?=$style['.menu']['font-size'] ;?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD>
								<input type='text' name='style[.menu][font-size]' size='4' value='<?=$style['.menu']['font-size'] ;?>'>px
							</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.menu']['background-color'] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD   bgcolor='#DDDDDD'>
								<input type='text' name='style[.menu][background-color]' size='8' value='<?=$style['.menu']['background-color'] ;?>'>
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.menu:a'][color] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD>
								<input type='text' name='style[.menu:a][color]' size='8' value='<?=$style['.menu:a'][color] ;?>'>
							</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-size:<?=$style['.menu:a']['font-size'] ;?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD   bgcolor='#DDDDDD'>
								<input type='text' name='style[.menu:a][font-size]' size='4' value='<?=$style['.menu:a']['font-size'] ;?>'>px
							</TD>
							<!------------------------->
							<TD colspan='2'></TD>

					</TR>
					<TR>
							<TD>inner Body</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.ibody']['color'] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD  bgcolor='#DDDDDD'>
								<input type='text' name='style[.ibody][color]' size='8' value='<?=$style['.ibody']['color'] ;?>'>
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-size:<?=$style['.ibody']['font-size'] ;?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD>
								<input type='text' name='style[.ibody][font-size]' size='4' value='<?=$style['.ibody']['font-size'] ;?>'>px
							</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.ibody']['background-color'] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD  bgcolor='#DDDDDD'>
								<input type='text' name='style[.ibody][background-color]' size='8' value='<?=$style['.ibody']['background-color'] ;?>'>
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.ibody:a'][color] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD>
								<input type='text' name='style[.ibody:a][color]' size='8' value='<?=$style['.ibody:a'][color] ;?>'>
							</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-size:<?=$style['.ibody:a']['font-size'] ;?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD  bgcolor='#DDDDDD'>
								<input type='text' name='style[.ibody:a][font-size]' size='4' value='<?=$style['.ibody:a']['font-size'] ;?>'>px
							</TD>
							<!------------------------->
							<TD colspan='2'></TD>

					</TR>
					<TR>
							<TD>Footer</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.footer']['color'] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD   bgcolor='#DDDDDD'>
								<input type='text' name='style[.footer][color]' size='8' value='<?=$style['.footer']['color'] ;?>'>
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-size:<?=$style['.footer']['font-size'] ;?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD>
								<input type='text' name='style[.footer][font-size]' size='4' value='<?=$style['.footer']['font-size'] ;?>'>px
							</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.footer']['background-color'] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD  bgcolor='#DDDDDD'>
								<input type='text' name='style[.footer][background-color]' size='8' value='<?=$style['.footer']['background-color'] ;?>'>
							</TD>
							<!------------------------->
							<TD> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;background-color:<?=$style['.footer:a'][color] ;?>;'>
								&nbsp;
								</div>
							</TD>
							<TD>
								<input type='text' name='style[.footer:a][color]' size='8' value='<?=$style['.footer:a'][color] ;?>'>
							</TD>
							<!------------------------->
							<TD bgcolor='#DDDDDD'> <div style='border-color:black;border-style:solid;border-width: 1 1 1 1;width:20;height=20;font-size:<?=$style['.footer:a']['font-size'] ;?>;'>
								<center>A</center>
								</div>
							</TD>
							<TD   bgcolor='#DDDDDD'>
								<input type='text' name='style[.footer:a][font-size]' size='4' value='<?=$style['.footer:a']['font-size'] ;?>'>px
							</TD>
							<!------------------------->
							<TD colspan='2'></TD>

					</TR>
					</TABLE>
			</div>
		</TD>
	</TR>
	<TR>
		<TD  align='center' colspan='2'>
			<input type='submit' value='Submit'>
		</TD>
	</TR>
</form>
</TABLE>

